{% extends 'admin/public/base.html' %}

{% block title %}
<title>商品管理--添加</title>
{% endblock %}

{% block script %}




{% endblock %}


<!-- 内容区 -->
{% block con %}            

<div class="row">
  <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
    <div class="widget am-cf">
      <div class="widget-head am-cf">
        <div class="widget-title am-fl">订单列表</div>
        <div class="widget-function am-fr">
          <a href="javascript:;" class="am-icon-cog"></a>
        </div>
      </div>
      <div class="widget-body  widget-body-lg am-fr">
        <table width="100%" class="am-table am-table-compact am-table-striped tpl-table-black " id="example-r">
          <thead>
            <tr>
                <th>所属用户</th>
                <th>订单号</th>
                <th>订单价格</th>
                <th>订单时间</th>
                <th>订单状态</th>
            </tr>
          </thead>
            <tbody>
                {% for i in info %}
                    <tr class="gradeX">
                        <td>{{ i.uid.username }}</td>
                        <td>{{ i.id }}</td>
                        <td>{{ i.totalprice }}元</td>
                        <td>{{ i.addtime }}</td>
                        <td>
                            {% if i.status == 0 %}
                            代付款
                            {% elif i.status == 1 %}
                            已付款,代发货
                            {% elif i.status == 2 %}
                            待收货
                            {% elif i.status == 3 %}
                             已取消
                            {% endif %}
                        </td>
                    </tr>
                    <tr>
                        <td colspan="5">
                        <ul class="am-list admin-sidebar-list" id="collapase-nav-1">
                            <li class="am-panel">
                                <a data-am-collapse="{parent: '#collapase-nav-1', target: '#{{ i.id }}'}">
                                    <i class="am-icon-users am-margin-left-sm"></i> 订单详细信息 <i class="am-icon-angle-right am-fr am-margin-right"></i>
                                </a>
                                <ul class="am-list am-collapse admin-sidebar-sub" id="{{ i.id }}">
                                    

                                    {% for v in i.orederinfo_set.all %}
                                     <li>
                                        <a href="#/userAdd"><i class="am-icon-user am-margin-left-sm"></i>购买商品:{{ v.goodsid.title}}</a>
                                        <a href="#/userAdd"><i class="am-icon-user am-margin-left-sm"></i>购买数量:{{ v.num }}</a>
                                        <a href="#/userAdd"><i class="am-icon-user am-margin-left-sm"></i>购买价格:{{ v.price }}</a>
                                    </li>                                    
                                    {% endfor %}
                                    
                                    <a href="#/userAdd"><i class="am-icon-user am-margin-left-sm"></i>收货人:{{ i.aid.addressname }}</a>
                                    <a href="#/userAdd"><i class="am-icon-user am-margin-left-sm"></i>收货地址:{{ i.aid.address }}</a>
                                    <a href="#/userAdd"><i class="am-icon-user am-margin-left-sm"></i>收货电话:{{ i.aid.addressphone }}</a>

                                    
                                </ul>
                            </li>
                        </ul>   
                        </td>             
                    </tr>    
                {% endfor %}



            </tbody>
        </table>
      </div>
    </div>
  </div>
</div>

{% endblock %}      
